package featuremodel.method;

import skyblue.Variable;

public class MethodChecker {

	// this method checks if the newly add method have a conflict with the older
	// ones; b is one of the output

	public static boolean checkConflicts(Variable a) {
		// if (ma.isBoundVariables(a) && mb.isBoundVariables(a)) {
		// return true;
		// }
		// if (ma.isOppositeVariables(a)&&mb.isOppositeVariables(a)) {
		// return true;
		// }
		// if (ma.isBoundVariables(a)&&mb.isUnboundVariables(a)) {
		// return true;
		// }
		// if (ma.isSameVariables(a)&&mb.isSameVariables(a)) {
		// return true;
		// }
		if (a.getMethodtype() != null&& a.getTobemethodtype() != null) {
			if (a.getMethodtype().equals(a.getTobemethodtype())) {
				return false;
			}
		} else {
			return false;
		}
		return true;

	}

	public static boolean checkBeforeConflicts2(Variable a) {

		if (a.getTobemethodtype() != null && a.getTobeMethodType2() != null) {
			if (a.getTobemethodtype().equals(a.getTobeMethodType2())) {
				return false;
			}
		} else {
			return false;
		}

		return true;

	}


}
